package org.particlethink.response;

import io.swagger.v3.oas.annotations.media.Schema;
import org.particlethink.model.Material;

import java.util.List;

public class MaterialListResponse {

    @Schema(description = "物料信息列表")
    private List<MaterialInfos> materials;
    private Integer total;//传给前端，不太好
    @Schema(description = "物料大类编号")
    private String materialKindId;
    @Schema(description = "物料大类名称")
    private String materialKindName;


    public MaterialListResponse() {
    }

    public MaterialListResponse(List<MaterialInfos> materials, String materialKindId, String materialKindName, Integer total ) {
        this.materials = materials;
        this.materialKindId = materialKindId;
        this.materialKindName = materialKindName;
        this.total =total;
    }

    public List<MaterialInfos> getMaterials() {
        return materials;
    }

    public void setMaterials(List<MaterialInfos> materials) {
        this.materials = materials;
    }

    public String getMaterialKindId() {
        return materialKindId;
    }

    public void setMaterialKindId(String materialKindId) {
        this.materialKindId = materialKindId;
    }

    public String getMaterialKindName() {
        return materialKindName;
    }

    public void setMaterialKindName(String materialKindName) {
        this.materialKindName = materialKindName;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public static class MaterialInfos {
        private List<MaterialInfo> materials;

        @Schema(description = "物料类别")
        private String materialKindId;
        @Schema(description = "物料类别名字")
        private String materialKindName;

        @Schema(description = "物料大类编号")
        private String ParentMaterialKindId;


        public MaterialInfos() {
        }

        public MaterialInfos(List<MaterialInfo> materials, String materialKindId, String materialKindName) {
            this.materials = materials;
            this.materialKindId = materialKindId;
            this.materialKindName = materialKindName;
        }

        public List<MaterialInfo> getMaterials() {
            return materials;
        }

        public void setMaterials(List<MaterialInfo> materials) {
            this.materials = materials;
        }

        public String getMaterialKindId() {
            return materialKindId;
        }

        public void setMaterialKindId(String materialKindId) {
            this.materialKindId = materialKindId;
        }

        public String getMaterialKindName() {
            return materialKindName;
        }

        public void setMaterialKindName(String materialKindName) {
            this.materialKindName = materialKindName;
        }

        public String getParentMaterialKindId() {
            return ParentMaterialKindId;
        }

        public void setParentMaterialKindId(String parentMaterialKindId) {
            ParentMaterialKindId = parentMaterialKindId;
        }
    }
}
